package com.wolfeyes.system.service.impl;

import com.wolfeyes.system.domain.SysCinema;
import com.wolfeyes.system.domain.vo.SysCinemaVo;
import com.wolfeyes.system.mapper.SysCinemaMapper;
import com.wolfeyes.system.service.SysCinemaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @see Talk is cheap, Show me the code. -- Linus Torvalds
 * @title 电影院信息服务层-实现类
 * @author yanyljava
 * @email yanyljava@qq.com
 * @create 2022-01-15 22:24
 */
@Service
public class SysCinemaServiceImpl implements SysCinemaService {

	@Autowired
	private SysCinemaMapper sysCinemaMapper;


	@Override
	public List<SysCinema> findAll(SysCinemaVo sysCinemaVo) {
		return sysCinemaMapper.findAll(sysCinemaVo);
	}

	@Override
	public SysCinema findById(Long id) {
		return sysCinemaMapper.findById(id);
	}

	@Override
	public int add(SysCinema sysCinema) {
		return sysCinemaMapper.add(sysCinema);
	}

	@Override
	public int update(SysCinema sysCinema) {
		return sysCinemaMapper.update(sysCinema);
	}

	@Override
	public int delete(Long[] ids) {
		int rows = 0;
		for (Long id : ids) {
			rows += sysCinemaMapper.delete(id);
		}
		return rows;
	}

	@Override
	public SysCinema findCinemaById(Long id) {
		return sysCinemaMapper.findCinemaById(id);
	}
	
}

